#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int n,a[100005],cnt=0,dp[100005];
int f(int s,int i)
{
    for(int j=1;j<=i;j++)
    {
        if(a[i]<s)
        {
            return 0;
        }
    }
    return 1;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    dp[1]=a[1];
    for(int i=2;i<=n;i++)
    {
        dp[i]=dp[i-1]+f(a[i],i);
    }
    cout<<dp[n];
    return 0;
}
